package com.appwoo.txtws.adapter;

import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import com.appwoo.txtws.bean.CapturePicBean;
import com.appwoo.txtws.component.AsyncImageLoader;
import com.appwoo.txtws.component.AsyncImageLoader.ImageCallback;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CapturePicAdapter extends ArrayAdapter<CapturePicBean>
{
  private AsyncImageLoader imageLoader = new AsyncImageLoader();
  private Map<Integer, View> viewMap = new HashMap();

  public CapturePicAdapter(Activity paramActivity, List<CapturePicBean> paramList)
  {
    super(paramActivity, 0, paramList);
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    View localView = (View)this.viewMap.get(Integer.valueOf(paramInt));
    if (localView == null)
    {
      localView = ((Activity)getContext()).getLayoutInflater().inflate(2130903123, null);
      CapturePicBean localCapturePicBean = (CapturePicBean)getItem(paramInt);
      final ImageView localImageView = (ImageView)localView.findViewById(2131493162);
      localImageView.setBackgroundResource(2130837773);
      if ((localCapturePicBean != null) && (localCapturePicBean.getPicThumb() != null) && (!localCapturePicBean.getPicThumb().equals("")))
        this.imageLoader.loadDrawable(localCapturePicBean.getPicThumb(), new AsyncImageLoader.ImageCallback()
        {
          public void imageLoaded(Drawable paramAnonymousDrawable, String paramAnonymousString)
          {
            localImageView.setImageDrawable(paramAnonymousDrawable);
            localImageView.setBackgroundResource(0);
          }
        });
      this.viewMap.put(Integer.valueOf(paramInt), localView);
    }
    return localView;
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.adapter.CapturePicAdapter
 * JD-Core Version:    0.6.2
 */